package unit8;


/**
 * @author v_irlwang
 * @date 2021/4/19
 */
public class Example01 {

    private int low;
    private int high;

    /**
     * before refactoring
     */
    private boolean includes(int arg) {
        return arg >= low && arg <= high;
    }


    /**
     * after refactoring
     */
    private boolean includes2(int arg) {
        return arg >= getLow() && arg <= getHigh();
    }

    private int getHigh() {
        return this.high;
    }

    private int getLow() {
        return this.low;
    }

}